package com.link2room.bumblebee.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2017/5/15.
 */
@Entity
@Table(name = "pms_reservation_option")
public class PmsReservationOption extends BaseEntity{
    private String src;
    private String market;
    private String salesChannel;
    private String otaChannel;
    private String pbChannel;
    private String resType;
    private String taCode;
    private String pmsResType;
    private String reserveSource;

    @Basic
    @Column(name = "pb_channel", nullable = true, length = 32)
    public String getPbChannel() {
        return pbChannel;
    }

    public void setPbChannel(String pbChannel) {
        this.pbChannel = pbChannel;
    }

    @Basic
    @Column(name = "res_type", nullable = true, length = 32)
    public String getResType() {
        return resType;
    }

    public void setResType(String resType) {
        this.resType = resType;
    }

    @Basic
    @Column(name = "src", nullable = true, length = 32)
    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    @Basic
    @Column(name = "market", nullable = true, length = 32)
    public String getMarket() {
        return market;
    }

    public void setMarket(String market) {
        this.market = market;
    }

    @Basic
    @Column(name = "sales_channel", nullable = true, length = 32)
    public String getSalesChannel() {
        return salesChannel;
    }

    public void setSalesChannel(String salesChannel) {
        this.salesChannel = salesChannel;
    }

    @Basic
    @Column(name = "ota_channel", nullable = true, length = 32)
    public String getOtaChannel() {
        return otaChannel;
    }

    public void setOtaChannel(String otaChannel) {
        this.otaChannel = otaChannel;
    }

    @Basic
    @Column(name = "ta_code", nullable = true, length = 128)
    public String getTaCode() {
        return taCode;
    }

    public void setTaCode(String taCode) {
        this.taCode = taCode;
    }

    @Basic
    @Column(name = "pms_res_type", nullable = true, length = 32)
    public String getPmsResType() {
        return pmsResType;
    }

    public void setPmsResType(String pmsResType) {
        this.pmsResType = pmsResType;
    }

    @Basic
    @Column(name = "reserve_source", nullable = true, length = 32)
    public String getReserveSource() {
        return reserveSource;
    }

    public void setReserveSource(String reserveSource) {
        this.reserveSource = reserveSource;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PmsReservationOption that = (PmsReservationOption) o;

        if (src != null ? !src.equals(that.src) : that.src != null) return false;
        if (market != null ? !market.equals(that.market) : that.market != null) return false;
        if (salesChannel != null ? !salesChannel.equals(that.salesChannel) : that.salesChannel != null) return false;
        if (otaChannel != null ? !otaChannel.equals(that.otaChannel) : that.otaChannel != null) return false;
        if (pbChannel != null ? !pbChannel.equals(that.pbChannel) : that.pbChannel != null) return false;
        return resType != null ? resType.equals(that.resType) : that.resType == null;

    }

    @Override
    public int hashCode() {
        int result = src != null ? src.hashCode() : 0;
        result = 31 * result + (market != null ? market.hashCode() : 0);
        result = 31 * result + (salesChannel != null ? salesChannel.hashCode() : 0);
        result = 31 * result + (otaChannel != null ? otaChannel.hashCode() : 0);
        result = 31 * result + (pbChannel != null ? pbChannel.hashCode() : 0);
        result = 31 * result + (resType != null ? resType.hashCode() : 0);
        return result;
    }
}
